﻿using System;
using System.Collections.Generic;
using System.Text;

namespace dotnet2cache.Abstractions
{
    public interface IDotNetTwoCache
    {

        T Get<T>(string key,Func<T> getDaataFuc =null);

        object Get(string key, Func<object> getDaataFuc = null);

        void Set<T>(string key, T value);

        void Set<T>(string key, T value, DateTimeOffset absoluteExpiration);

        void Set<T>(string key, T value, CacheOptionEntry cacheOptionEntry);
       

        void Set<T>(string key, T value, DateTimeOffset level1AbsoluteExpiration, DateTimeOffset level2AbsoluteExpiration);

        void Set<T>(string key, T value, TimeSpan absoluteExpirationRelativeToNow);

        void Set<T>(string key, T value, TimeSpan level1AbsoluteExpirationRelativeToNow, TimeSpan level2AbsoluteExpirationRelativeToNow);




        bool Remove(string key);
    }
}
